<!DOCTYPE HTML>
<html>
<head>
<title>WinGetActiveTitle | AutoHotkey v1</title>
<meta name="description" content="The WinGetActiveTitle command retrieves the title of the active window." />
<meta name="ahk:equiv-v2" content="lib/WinGetTitle.htm" />
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>WinGetActiveTitle</h1>

<p>获取活动窗口的标题.</p>

<pre class="Syntax"><span class="func">WinGetActiveTitle</span>, OutputVar</pre>
<h2 id="Parameters">参数</h2>
<dl>

  <dt>OutputVar</dt>
  <dd><p>用来保存活动窗口标题的输出变量的名称.</p></dd>

</dl>

<h2 id="Remarks">备注</h2>
<p>此命令相当于: <code><a href="WinGetTitle.htm">WinGetTitle</a>, OutputVar, A</code>.</p>
<h2 id="Related">相关</h2>
<p><a href="WinGetPos.htm">WinGetPos</a>, <a href="WinGetActiveStats.htm">WinGetActiveStats</a>, <a href="WinGetTitle.htm">WinGetTitle</a>, <a href="WinGetClass.htm">WinGetClass</a>, <a href="WinGetText.htm">WinGetText</a>, <a href="ControlGetText.htm">ControlGetText</a></p>
<h2 id="Examples">示例</h2>
<div class="ex" id="ExBasic">
<p><a class="ex_number" href="#ExBasic"></a> 检索并报告活动窗口的标题.</p>
<pre>WinGetActiveTitle, Title
MsgBox, The active window is "%Title%".</pre>
</div>

</body>
</html>